Why would changing httpd.conf work for me, but .htaccess would not? [closed]

Posted by Carl Rempel on Server Fault See other posts from Server Fault or by Carl Rempel
Published on 2012-12-12T22:18:09Z Indexed on 2012/12/12 23:05 UTC
Read the original article Hit count: 258

Filed under:
|

I have html files which contain PHP. When I use filename.php they work great. When I use filename.html the entire file renders as plain text.

If I add the following line to my .htaccess, the file still appears as plain text.

AddType application/x-httpd-php .php .html

But ... if I add the the exact same line to my httpd.conf, then PHP renders my page correctly.

What are some possible explanations as to why the .htaccess would not work for me?

I'm using apache OS X, Snow Leopard.

© Server Fault or respective owner

Related posts about apache2

Related posts about php